<?php

/**
 * Task form.
 *
 * @package    mysmartmanager
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class TaskForm extends BaseTaskForm
{
  public function configure()
  {
    $this->widgetSchema->setLabels(array(
	  'shortsummary'      => 'Short Summary *',
      'milestoneid'    => 'Milestone',
      'resourceid'      => 'Assign to',
      'taskstatus'   => 'Task Status',
	  'estimatedenddate' => 'End Date',
  	  'startdate' => 'Start Date',
	));
	$this->validatorSchema->setPostValidator(new sfValidatorAnd(array(new sfValidatorSchemaCompare('startdate', '<', 'estimatedenddate', array('throw_global_error' => false), array('invalid' => 'The start date must be before the end date <br />')))));
	unset(
      $this['actualenddate'], $this['createdate']
    );
  }
}
